﻿using IntoNails.Infrastructure.InteractionRequests;
using IntoNails.Models;
using IntoNails.Modules.UserManagement.InteractionRequests;
using IntoNails.Modules.UserManagement.ViewModels;

namespace IntoNails.Modules.UserManagement.Views
{
    /// <summary>
    /// Interaction logic for UserInteractionDialogView.xaml
    /// </summary>
    public partial class UserInteractionDialogView : ShowUserInteractionDialogRequest, IGenericInteractionView<User>
    {
        public UserInteractionDialogView()
        {
            InitializeComponent();

            this.ViewModel = new UserInteractionDialogViewModel();
            this.DataContext = this.ViewModel;
        }

        public UserInteractionDialogViewModel ViewModel { get; private set; }

        public void SetEntity(User entity)
        {
            this.ViewModel.SetEntity(entity);
        }

        public User GetEntity()
        {
            return this.ViewModel.GetEntity();
        }
    }
}
